<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="format-detection" content="telephone=no">
    <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/zepto.js" charset="utf-8"></script>   
	<title>完善卖家信息</title>
    <style type="text/css">
        * {
            outline: none;
            -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
            vertical-align: baseline;
            font-style: normal;
        }

        body {
            margin: 0;
            padding: 0;
            font-size: 12px;
            font-family: Microsoft Yahei, Arial, Simsun, Helvetica, Segoe UI, sans-serif;
            color: #404040;
            background-color: #efeff4;
        }

        img {
            border: 0
        }

        ul, ol, li, dt, dl, dd {
            text-decoration: none;
            list-style: none;
            vertical-align: middle;
            margin: 0;
            padding: 0;
        }

        a,
        a:visited {
            color: #373737;
            text-decoration: none;
        }

        .blank {
            width: 100%;
            height: 20px;
        }
    </style>
</head>

<body>
    <style type="text/css">
        .blank {
            width: 100%;
            height: 20px;
        }

        .userinfoMain {
            width: 100%;
            background-color: #FFF;
            display: table;
        }

        .userinfoMain .userinfoItem {
            width: 96%;
            margin-left: 4%;
            height: 50px;
            line-height: 50px;
        }

        .userinfoMain .userinfoItem span {
            float: left;
            display: block;
            width: 80px;
            height: 50px;
            line-height: 50px;
            text-align: left;
            font-size: 14px;
        }

        .userinfoMain .userinfoItem {
            border-bottom: 1px solid #dbdbdb;
        }

        .userinfoMain .userinfoItem:last-child {
            border-bottom: none;
        }

        .userinfoMain .userinfoItem input {
            width: 210px;
            height: 30px;
            border: none;
            font-size: 14px;
        }

        button {
            width: 94%;
            margin: 0 3%;
            border: none;
            background: #08BA06;
            border-radius: 4px;
            height: 40px;
            line-height: 40px;
            font-size: 18px;
            color: #FFF;
            margin-top: 40px;
            outline: none
        }
    </style>


    <div id="contentbox" style="min-height: 576px;">
        <div class="blank"></div>
		
        <div class="userinfoMain">      	
            <div class="userinfoItem">
                <span>手机号：</span>
                <input placeholder="请填写手机号" name="mobile" type="text" value="<?php echo $output['seller']['mobile'];?>">
            </div>
        </div>
        <div class="userinfoMain">      	
            <div class="userinfoItem">
                <span>登录密码：</span>
                <input placeholder="请填写密码" name="spassword" type="text" value="">
            </div>
            <div class="userinfoItem">
				<font style="color:red" id="msg"></font>
            </div>
        </div>
        <div class="userinfoMain" style="height:100px;">      	
            <div class="userinfoItem"><font color="red">请使用您设置的手机号和密码登录：<?php echo $_SERVER['SERVER_NAME'];?>卖家中心进行资质认证。</font></div>
        </div>
        
        <button class="submit">确 认</button>
    </div>
    
    <script type="text/javascript">
        $(function () {
            $(".submit").on("click", function() {
                var mobile = $('input[name=mobile]').val();
                var spassword = $('input[name=spassword]').val();

                var error = '';
				if(mobile == ''){
					error+='手机号不能为空,';
				}

				if(spassword == ''){
					error+='密码不能为空';
				}

				if(error != ''){
					$('#msg').html(error);
					return false;
				}

				$.ajax({
					type:'post',
					url:'index.php?act=my&op=sellerinfo',
					data:{mobile:mobile,spassword:spassword},
					dataType:'json',
					success:function(data){
						if(data.state=='1'){
							location.href = 'index.php?act=my&op=renzheng';
							return false;
						}else{
							$('#msg').html(data.error);
						}
					}
				});
            });

        });
    </script>
</body>
</html>